// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::ApiHub;
/// let client = ApiHub::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service provides all methods related to the API hub.
///
/// # Configuration
///
/// To configure `ApiHub` use the `with_*` methods in the type returned
/// by [builder()][ApiHub::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::api_hub::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::api_hub::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `ApiHub` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `ApiHub` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct ApiHub {
    inner: std::sync::Arc<dyn super::stub::dynamic::ApiHub>,
}

impl ApiHub {
    /// Returns a builder for [ApiHub].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::ApiHub;
    /// let client = ApiHub::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::api_hub::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::api_hub::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::ApiHub + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::ApiHub>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHub> {
        super::transport::ApiHub::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHub> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::ApiHub::new)
    }

    /// Create an API resource in the API hub.
    /// Once an API resource is created, versions can be added to it.
    pub fn create_api(&self) -> super::builder::api_hub::CreateApi {
        super::builder::api_hub::CreateApi::new(self.inner.clone())
    }

    /// Get API resource details including the API versions contained in it.
    pub fn get_api(&self) -> super::builder::api_hub::GetApi {
        super::builder::api_hub::GetApi::new(self.inner.clone())
    }

    /// List API resources in the API hub.
    pub fn list_apis(&self) -> super::builder::api_hub::ListApis {
        super::builder::api_hub::ListApis::new(self.inner.clone())
    }

    /// Update an API resource in the API hub. The following fields in the
    /// [API][google.cloud.apihub.v1.Api] can be updated:
    ///
    /// * [display_name][google.cloud.apihub.v1.Api.display_name]
    /// * [description][google.cloud.apihub.v1.Api.description]
    /// * [owner][google.cloud.apihub.v1.Api.owner]
    /// * [documentation][google.cloud.apihub.v1.Api.documentation]
    /// * [target_user][google.cloud.apihub.v1.Api.target_user]
    /// * [team][google.cloud.apihub.v1.Api.team]
    /// * [business_unit][google.cloud.apihub.v1.Api.business_unit]
    /// * [maturity_level][google.cloud.apihub.v1.Api.maturity_level]
    /// * [api_style][google.cloud.apihub.v1.Api.api_style]
    /// * [attributes][google.cloud.apihub.v1.Api.attributes]
    ///
    /// The
    /// [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask]
    /// should be used to specify the fields being updated.
    ///
    /// Updating the owner field requires complete owner message
    /// and updates both owner and email fields.
    ///
    /// [google.cloud.apihub.v1.Api]: crate::model::Api
    /// [google.cloud.apihub.v1.Api.api_style]: crate::model::Api::api_style
    /// [google.cloud.apihub.v1.Api.attributes]: crate::model::Api::attributes
    /// [google.cloud.apihub.v1.Api.business_unit]: crate::model::Api::business_unit
    /// [google.cloud.apihub.v1.Api.description]: crate::model::Api::description
    /// [google.cloud.apihub.v1.Api.display_name]: crate::model::Api::display_name
    /// [google.cloud.apihub.v1.Api.documentation]: crate::model::Api::documentation
    /// [google.cloud.apihub.v1.Api.maturity_level]: crate::model::Api::maturity_level
    /// [google.cloud.apihub.v1.Api.owner]: crate::model::Api::owner
    /// [google.cloud.apihub.v1.Api.target_user]: crate::model::Api::target_user
    /// [google.cloud.apihub.v1.Api.team]: crate::model::Api::team
    /// [google.cloud.apihub.v1.UpdateApiRequest.update_mask]: crate::model::UpdateApiRequest::update_mask
    pub fn update_api(&self) -> super::builder::api_hub::UpdateApi {
        super::builder::api_hub::UpdateApi::new(self.inner.clone())
    }

    /// Delete an API resource in the API hub. API can only be deleted if all
    /// underlying versions are deleted.
    pub fn delete_api(&self) -> super::builder::api_hub::DeleteApi {
        super::builder::api_hub::DeleteApi::new(self.inner.clone())
    }

    /// Create an API version for an API resource in the API hub.
    pub fn create_version(&self) -> super::builder::api_hub::CreateVersion {
        super::builder::api_hub::CreateVersion::new(self.inner.clone())
    }

    /// Get details about the API version of an API resource. This will include
    /// information about the specs and operations present in the API
    /// version as well as the deployments linked to it.
    pub fn get_version(&self) -> super::builder::api_hub::GetVersion {
        super::builder::api_hub::GetVersion::new(self.inner.clone())
    }

    /// List API versions of an API resource in the API hub.
    pub fn list_versions(&self) -> super::builder::api_hub::ListVersions {
        super::builder::api_hub::ListVersions::new(self.inner.clone())
    }

    /// Update API version. The following fields in the
    /// [version][google.cloud.apihub.v1.Version] can be updated currently:
    ///
    /// * [display_name][google.cloud.apihub.v1.Version.display_name]
    /// * [description][google.cloud.apihub.v1.Version.description]
    /// * [documentation][google.cloud.apihub.v1.Version.documentation]
    /// * [deployments][google.cloud.apihub.v1.Version.deployments]
    /// * [lifecycle][google.cloud.apihub.v1.Version.lifecycle]
    /// * [compliance][google.cloud.apihub.v1.Version.compliance]
    /// * [accreditation][google.cloud.apihub.v1.Version.accreditation]
    /// * [attributes][google.cloud.apihub.v1.Version.attributes]
    ///
    /// The
    /// [update_mask][google.cloud.apihub.v1.UpdateVersionRequest.update_mask]
    /// should be used to specify the fields being updated.
    ///
    /// [google.cloud.apihub.v1.UpdateVersionRequest.update_mask]: crate::model::UpdateVersionRequest::update_mask
    /// [google.cloud.apihub.v1.Version]: crate::model::Version
    /// [google.cloud.apihub.v1.Version.accreditation]: crate::model::Version::accreditation
    /// [google.cloud.apihub.v1.Version.attributes]: crate::model::Version::attributes
    /// [google.cloud.apihub.v1.Version.compliance]: crate::model::Version::compliance
    /// [google.cloud.apihub.v1.Version.deployments]: crate::model::Version::deployments
    /// [google.cloud.apihub.v1.Version.description]: crate::model::Version::description
    /// [google.cloud.apihub.v1.Version.display_name]: crate::model::Version::display_name
    /// [google.cloud.apihub.v1.Version.documentation]: crate::model::Version::documentation
    /// [google.cloud.apihub.v1.Version.lifecycle]: crate::model::Version::lifecycle
    pub fn update_version(&self) -> super::builder::api_hub::UpdateVersion {
        super::builder::api_hub::UpdateVersion::new(self.inner.clone())
    }

    /// Delete an API version. Version can only be deleted if all underlying specs,
    /// operations, definitions and linked deployments are deleted.
    pub fn delete_version(&self) -> super::builder::api_hub::DeleteVersion {
        super::builder::api_hub::DeleteVersion::new(self.inner.clone())
    }

    /// Add a spec to an API version in the API hub.
    /// Multiple specs can be added to an API version.
    /// Note, while adding a spec, at least one of `contents` or `source_uri` must
    /// be provided. If `contents` is provided, then `spec_type` must also be
    /// provided.
    ///
    /// On adding a spec with contents to the version, the operations present in it
    /// will be added to the version.Note that the file contents in the spec should
    /// be of the same type as defined in the
    /// `projects/{project}/locations/{location}/attributes/system-spec-type`
    /// attribute associated with spec resource. Note that specs of various types
    /// can be uploaded, however parsing of details is supported for OpenAPI spec
    /// currently.
    ///
    /// In order to access the information parsed from the spec, use the
    /// [GetSpec][google.cloud.apihub.v1.ApiHub.GetSpec] method.
    /// In order to access the raw contents for a particular spec, use the
    /// [GetSpecContents][google.cloud.apihub.v1.ApiHub.GetSpecContents] method.
    /// In order to access the operations parsed from the spec, use the
    /// [ListAPIOperations][google.cloud.apihub.v1.ApiHub.ListApiOperations]
    /// method.
    ///
    /// [google.cloud.apihub.v1.ApiHub.GetSpec]: crate::client::ApiHub::get_spec
    /// [google.cloud.apihub.v1.ApiHub.GetSpecContents]: crate::client::ApiHub::get_spec_contents
    /// [google.cloud.apihub.v1.ApiHub.ListApiOperations]: crate::client::ApiHub::list_api_operations
    pub fn create_spec(&self) -> super::builder::api_hub::CreateSpec {
        super::builder::api_hub::CreateSpec::new(self.inner.clone())
    }

    /// Get details about the information parsed from a spec.
    /// Note that this method does not return the raw spec contents.
    /// Use [GetSpecContents][google.cloud.apihub.v1.ApiHub.GetSpecContents] method
    /// to retrieve the same.
    ///
    /// [google.cloud.apihub.v1.ApiHub.GetSpecContents]: crate::client::ApiHub::get_spec_contents
    pub fn get_spec(&self) -> super::builder::api_hub::GetSpec {
        super::builder::api_hub::GetSpec::new(self.inner.clone())
    }

    /// Get spec contents.
    pub fn get_spec_contents(&self) -> super::builder::api_hub::GetSpecContents {
        super::builder::api_hub::GetSpecContents::new(self.inner.clone())
    }

    /// List specs corresponding to a particular API resource.
    pub fn list_specs(&self) -> super::builder::api_hub::ListSpecs {
        super::builder::api_hub::ListSpecs::new(self.inner.clone())
    }

    /// Update spec. The following fields in the
    /// [spec][google.cloud.apihub.v1.Spec] can be updated:
    ///
    /// * [display_name][google.cloud.apihub.v1.Spec.display_name]
    /// * [source_uri][google.cloud.apihub.v1.Spec.source_uri]
    /// * [lint_response][google.cloud.apihub.v1.Spec.lint_response]
    /// * [attributes][google.cloud.apihub.v1.Spec.attributes]
    /// * [contents][google.cloud.apihub.v1.Spec.contents]
    /// * [spec_type][google.cloud.apihub.v1.Spec.spec_type]
    ///
    /// In case of an OAS spec, updating spec contents can lead to:
    ///
    /// 1. Creation, deletion and update of operations.
    /// 1. Creation, deletion and update of definitions.
    /// 1. Update of other info parsed out from the new spec.
    ///
    /// In case of contents or source_uri being present in update mask, spec_type
    /// must also be present. Also, spec_type can not be present in update mask if
    /// contents or source_uri is not present.
    ///
    /// The
    /// [update_mask][google.cloud.apihub.v1.UpdateSpecRequest.update_mask]
    /// should be used to specify the fields being updated.
    ///
    /// [google.cloud.apihub.v1.Spec]: crate::model::Spec
    /// [google.cloud.apihub.v1.Spec.attributes]: crate::model::Spec::attributes
    /// [google.cloud.apihub.v1.Spec.contents]: crate::model::Spec::contents
    /// [google.cloud.apihub.v1.Spec.display_name]: crate::model::Spec::display_name
    /// [google.cloud.apihub.v1.Spec.lint_response]: crate::model::Spec::lint_response
    /// [google.cloud.apihub.v1.Spec.source_uri]: crate::model::Spec::source_uri
    /// [google.cloud.apihub.v1.Spec.spec_type]: crate::model::Spec::spec_type
    /// [google.cloud.apihub.v1.UpdateSpecRequest.update_mask]: crate::model::UpdateSpecRequest::update_mask
    pub fn update_spec(&self) -> super::builder::api_hub::UpdateSpec {
        super::builder::api_hub::UpdateSpec::new(self.inner.clone())
    }

    /// Delete a spec.
    /// Deleting a spec will also delete the associated operations from the
    /// version.
    pub fn delete_spec(&self) -> super::builder::api_hub::DeleteSpec {
        super::builder::api_hub::DeleteSpec::new(self.inner.clone())
    }

    /// Create an apiOperation in an API version.
    /// An apiOperation can be created only if the version has no apiOperations
    /// which were created by parsing a spec.
    pub fn create_api_operation(&self) -> super::builder::api_hub::CreateApiOperation {
        super::builder::api_hub::CreateApiOperation::new(self.inner.clone())
    }

    /// Get details about a particular operation in API version.
    pub fn get_api_operation(&self) -> super::builder::api_hub::GetApiOperation {
        super::builder::api_hub::GetApiOperation::new(self.inner.clone())
    }

    /// List operations in an API version.
    pub fn list_api_operations(&self) -> super::builder::api_hub::ListApiOperations {
        super::builder::api_hub::ListApiOperations::new(self.inner.clone())
    }

    /// Update an operation in an API version. The following fields in the
    /// [ApiOperation resource][google.cloud.apihub.v1.ApiOperation] can be
    /// updated:
    ///
    /// * [details.description][ApiOperation.details.description]
    /// * [details.documentation][ApiOperation.details.documentation]
    /// * [details.http_operation.path][ApiOperation.details.http_operation.path.path]
    /// * [details.http_operation.method][ApiOperation.details.http_operation.method]
    /// * [details.deprecated][ApiOperation.details.deprecated]
    /// * [attributes][google.cloud.apihub.v1.ApiOperation.attributes]
    ///
    /// The
    /// [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask]
    /// should be used to specify the fields being updated.
    ///
    /// An operation can be updated only if the operation was created via
    /// [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
    /// If the operation was created by parsing the spec, then it can be edited by
    /// updating the spec.
    ///
    /// [google.cloud.apihub.v1.ApiHub.CreateApiOperation]: crate::client::ApiHub::create_api_operation
    /// [google.cloud.apihub.v1.ApiOperation]: crate::model::ApiOperation
    /// [google.cloud.apihub.v1.ApiOperation.attributes]: crate::model::ApiOperation::attributes
    /// [google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask]: crate::model::UpdateApiOperationRequest::update_mask
    pub fn update_api_operation(&self) -> super::builder::api_hub::UpdateApiOperation {
        super::builder::api_hub::UpdateApiOperation::new(self.inner.clone())
    }

    /// Delete an operation in an API version and we can delete only the
    /// operations created via create API. If the operation was created by parsing
    /// the spec, then it can be deleted by editing or deleting the spec.
    pub fn delete_api_operation(&self) -> super::builder::api_hub::DeleteApiOperation {
        super::builder::api_hub::DeleteApiOperation::new(self.inner.clone())
    }

    /// Get details about a definition in an API version.
    pub fn get_definition(&self) -> super::builder::api_hub::GetDefinition {
        super::builder::api_hub::GetDefinition::new(self.inner.clone())
    }

    /// Create a deployment resource in the API hub.
    /// Once a deployment resource is created, it can be associated with API
    /// versions.
    pub fn create_deployment(&self) -> super::builder::api_hub::CreateDeployment {
        super::builder::api_hub::CreateDeployment::new(self.inner.clone())
    }

    /// Get details about a deployment and the API versions linked to it.
    pub fn get_deployment(&self) -> super::builder::api_hub::GetDeployment {
        super::builder::api_hub::GetDeployment::new(self.inner.clone())
    }

    /// List deployment resources in the API hub.
    pub fn list_deployments(&self) -> super::builder::api_hub::ListDeployments {
        super::builder::api_hub::ListDeployments::new(self.inner.clone())
    }

    /// Update a deployment resource in the API hub. The following fields in the
    /// [deployment resource][google.cloud.apihub.v1.Deployment] can be
    /// updated:
    ///
    /// * [display_name][google.cloud.apihub.v1.Deployment.display_name]
    /// * [description][google.cloud.apihub.v1.Deployment.description]
    /// * [documentation][google.cloud.apihub.v1.Deployment.documentation]
    /// * [deployment_type][google.cloud.apihub.v1.Deployment.deployment_type]
    /// * [resource_uri][google.cloud.apihub.v1.Deployment.resource_uri]
    /// * [endpoints][google.cloud.apihub.v1.Deployment.endpoints]
    /// * [slo][google.cloud.apihub.v1.Deployment.slo]
    /// * [environment][google.cloud.apihub.v1.Deployment.environment]
    /// * [attributes][google.cloud.apihub.v1.Deployment.attributes]
    /// * [source_project] [google.cloud.apihub.v1.Deployment.source_project]
    /// * [source_environment]
    ///   [google.cloud.apihub.v1.Deployment.source_environment]
    /// * [management_url][google.cloud.apihub.v1.Deployment.management_url]
    /// * [source_uri][google.cloud.apihub.v1.Deployment.source_uri]
    ///   The
    ///   [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask]
    ///   should be used to specify the fields being updated.
    ///
    /// [google.cloud.apihub.v1.Deployment]: crate::model::Deployment
    /// [google.cloud.apihub.v1.Deployment.attributes]: crate::model::Deployment::attributes
    /// [google.cloud.apihub.v1.Deployment.deployment_type]: crate::model::Deployment::deployment_type
    /// [google.cloud.apihub.v1.Deployment.description]: crate::model::Deployment::description
    /// [google.cloud.apihub.v1.Deployment.display_name]: crate::model::Deployment::display_name
    /// [google.cloud.apihub.v1.Deployment.documentation]: crate::model::Deployment::documentation
    /// [google.cloud.apihub.v1.Deployment.endpoints]: crate::model::Deployment::endpoints
    /// [google.cloud.apihub.v1.Deployment.environment]: crate::model::Deployment::environment
    /// [google.cloud.apihub.v1.Deployment.management_url]: crate::model::Deployment::management_url
    /// [google.cloud.apihub.v1.Deployment.resource_uri]: crate::model::Deployment::resource_uri
    /// [google.cloud.apihub.v1.Deployment.slo]: crate::model::Deployment::slo
    /// [google.cloud.apihub.v1.Deployment.source_uri]: crate::model::Deployment::source_uri
    /// [google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask]: crate::model::UpdateDeploymentRequest::update_mask
    pub fn update_deployment(&self) -> super::builder::api_hub::UpdateDeployment {
        super::builder::api_hub::UpdateDeployment::new(self.inner.clone())
    }

    /// Delete a deployment resource in the API hub.
    pub fn delete_deployment(&self) -> super::builder::api_hub::DeleteDeployment {
        super::builder::api_hub::DeleteDeployment::new(self.inner.clone())
    }

    /// Create a user defined attribute.
    ///
    /// Certain pre defined attributes are already created by the API hub. These
    /// attributes will have type as `SYSTEM_DEFINED` and can be listed via
    /// [ListAttributes][google.cloud.apihub.v1.ApiHub.ListAttributes] method.
    /// Allowed values for the same can be updated via
    /// [UpdateAttribute][google.cloud.apihub.v1.ApiHub.UpdateAttribute] method.
    ///
    /// [google.cloud.apihub.v1.ApiHub.ListAttributes]: crate::client::ApiHub::list_attributes
    /// [google.cloud.apihub.v1.ApiHub.UpdateAttribute]: crate::client::ApiHub::update_attribute
    pub fn create_attribute(&self) -> super::builder::api_hub::CreateAttribute {
        super::builder::api_hub::CreateAttribute::new(self.inner.clone())
    }

    /// Get details about the attribute.
    pub fn get_attribute(&self) -> super::builder::api_hub::GetAttribute {
        super::builder::api_hub::GetAttribute::new(self.inner.clone())
    }

    /// Update the attribute.  The following fields in the
    /// [Attribute resource][google.cloud.apihub.v1.Attribute] can be updated:
    ///
    /// * [display_name][google.cloud.apihub.v1.Attribute.display_name]
    ///   The display name can be updated for user defined attributes only.
    /// * [description][google.cloud.apihub.v1.Attribute.description]
    ///   The description can be updated for user defined attributes only.
    /// * [allowed_values][google.cloud.apihub.v1.Attribute.allowed_values]
    ///   To update the list of allowed values, clients need to use the fetched list
    ///   of allowed values and add or remove values to or from the same list.
    ///   The mutable allowed values can be updated for both user defined and System
    ///   defined attributes. The immutable allowed values cannot be updated or
    ///   deleted. The updated list of allowed values cannot be empty. If an allowed
    ///   value that is already used by some resource's attribute is deleted, then
    ///   the association between the resource and the attribute value will also be
    ///   deleted.
    /// * [cardinality][google.cloud.apihub.v1.Attribute.cardinality]
    ///   The cardinality can be updated for user defined attributes only.
    ///   Cardinality can only be increased during an update.
    ///
    /// The
    /// [update_mask][google.cloud.apihub.v1.UpdateAttributeRequest.update_mask]
    /// should be used to specify the fields being updated.
    ///
    /// [google.cloud.apihub.v1.Attribute]: crate::model::Attribute
    /// [google.cloud.apihub.v1.Attribute.allowed_values]: crate::model::Attribute::allowed_values
    /// [google.cloud.apihub.v1.Attribute.cardinality]: crate::model::Attribute::cardinality
    /// [google.cloud.apihub.v1.Attribute.description]: crate::model::Attribute::description
    /// [google.cloud.apihub.v1.Attribute.display_name]: crate::model::Attribute::display_name
    /// [google.cloud.apihub.v1.UpdateAttributeRequest.update_mask]: crate::model::UpdateAttributeRequest::update_mask
    pub fn update_attribute(&self) -> super::builder::api_hub::UpdateAttribute {
        super::builder::api_hub::UpdateAttribute::new(self.inner.clone())
    }

    /// Delete an attribute.
    ///
    /// Note: System defined attributes cannot be deleted. All
    /// associations of the attribute being deleted with any API hub resource will
    /// also get deleted.
    pub fn delete_attribute(&self) -> super::builder::api_hub::DeleteAttribute {
        super::builder::api_hub::DeleteAttribute::new(self.inner.clone())
    }

    /// List all attributes.
    pub fn list_attributes(&self) -> super::builder::api_hub::ListAttributes {
        super::builder::api_hub::ListAttributes::new(self.inner.clone())
    }

    /// Search across API-Hub resources.
    pub fn search_resources(&self) -> super::builder::api_hub::SearchResources {
        super::builder::api_hub::SearchResources::new(self.inner.clone())
    }

    /// Create an External API resource in the API hub.
    pub fn create_external_api(&self) -> super::builder::api_hub::CreateExternalApi {
        super::builder::api_hub::CreateExternalApi::new(self.inner.clone())
    }

    /// Get details about an External API resource in the API hub.
    pub fn get_external_api(&self) -> super::builder::api_hub::GetExternalApi {
        super::builder::api_hub::GetExternalApi::new(self.inner.clone())
    }

    /// Update an External API resource in the API hub. The following fields can be
    /// updated:
    ///
    /// * [display_name][google.cloud.apihub.v1.ExternalApi.display_name]
    /// * [description][google.cloud.apihub.v1.ExternalApi.description]
    /// * [documentation][google.cloud.apihub.v1.ExternalApi.documentation]
    /// * [endpoints][google.cloud.apihub.v1.ExternalApi.endpoints]
    /// * [paths][google.cloud.apihub.v1.ExternalApi.paths]
    ///
    /// The
    /// [update_mask][google.cloud.apihub.v1.UpdateExternalApiRequest.update_mask]
    /// should be used to specify the fields being updated.
    ///
    /// [google.cloud.apihub.v1.ExternalApi.description]: crate::model::ExternalApi::description
    /// [google.cloud.apihub.v1.ExternalApi.display_name]: crate::model::ExternalApi::display_name
    /// [google.cloud.apihub.v1.ExternalApi.documentation]: crate::model::ExternalApi::documentation
    /// [google.cloud.apihub.v1.ExternalApi.endpoints]: crate::model::ExternalApi::endpoints
    /// [google.cloud.apihub.v1.ExternalApi.paths]: crate::model::ExternalApi::paths
    /// [google.cloud.apihub.v1.UpdateExternalApiRequest.update_mask]: crate::model::UpdateExternalApiRequest::update_mask
    pub fn update_external_api(&self) -> super::builder::api_hub::UpdateExternalApi {
        super::builder::api_hub::UpdateExternalApi::new(self.inner.clone())
    }

    /// Delete an External API resource in the API hub.
    pub fn delete_external_api(&self) -> super::builder::api_hub::DeleteExternalApi {
        super::builder::api_hub::DeleteExternalApi::new(self.inner.clone())
    }

    /// List External API resources in the API hub.
    pub fn list_external_apis(&self) -> super::builder::api_hub::ListExternalApis {
        super::builder::api_hub::ListExternalApis::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::api_hub::ListLocations {
        super::builder::api_hub::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::api_hub::GetLocation {
        super::builder::api_hub::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::api_hub::ListOperations {
        super::builder::api_hub::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::api_hub::GetOperation {
        super::builder::api_hub::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::api_hub::DeleteOperation {
        super::builder::api_hub::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::api_hub::CancelOperation {
        super::builder::api_hub::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::ApiHubDependencies;
/// let client = ApiHubDependencies::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service provides methods for various operations related to a
/// [Dependency][google.cloud.apihub.v1.Dependency] in the API hub.
///
/// [google.cloud.apihub.v1.Dependency]: crate::model::Dependency
///
/// # Configuration
///
/// To configure `ApiHubDependencies` use the `with_*` methods in the type returned
/// by [builder()][ApiHubDependencies::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::api_hub_dependencies::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::api_hub_dependencies::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `ApiHubDependencies` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `ApiHubDependencies` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct ApiHubDependencies {
    inner: std::sync::Arc<dyn super::stub::dynamic::ApiHubDependencies>,
}

impl ApiHubDependencies {
    /// Returns a builder for [ApiHubDependencies].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::ApiHubDependencies;
    /// let client = ApiHubDependencies::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::api_hub_dependencies::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::api_hub_dependencies::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::ApiHubDependencies + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::ApiHubDependencies>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubDependencies> {
        super::transport::ApiHubDependencies::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubDependencies> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::ApiHubDependencies::new)
    }

    /// Create a dependency between two entities in the API hub.
    pub fn create_dependency(&self) -> super::builder::api_hub_dependencies::CreateDependency {
        super::builder::api_hub_dependencies::CreateDependency::new(self.inner.clone())
    }

    /// Get details about a dependency resource in the API hub.
    pub fn get_dependency(&self) -> super::builder::api_hub_dependencies::GetDependency {
        super::builder::api_hub_dependencies::GetDependency::new(self.inner.clone())
    }

    /// Update a dependency based on the
    /// [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask]
    /// provided in the request.
    ///
    /// The following fields in the [dependency][google.cloud.apihub.v1.Dependency]
    /// can be updated:
    ///
    /// * [description][google.cloud.apihub.v1.Dependency.description]
    ///
    /// [google.cloud.apihub.v1.Dependency]: crate::model::Dependency
    /// [google.cloud.apihub.v1.Dependency.description]: crate::model::Dependency::description
    /// [google.cloud.apihub.v1.UpdateDependencyRequest.update_mask]: crate::model::UpdateDependencyRequest::update_mask
    pub fn update_dependency(&self) -> super::builder::api_hub_dependencies::UpdateDependency {
        super::builder::api_hub_dependencies::UpdateDependency::new(self.inner.clone())
    }

    /// Delete the dependency resource.
    pub fn delete_dependency(&self) -> super::builder::api_hub_dependencies::DeleteDependency {
        super::builder::api_hub_dependencies::DeleteDependency::new(self.inner.clone())
    }

    /// List dependencies based on the provided filter and pagination parameters.
    pub fn list_dependencies(&self) -> super::builder::api_hub_dependencies::ListDependencies {
        super::builder::api_hub_dependencies::ListDependencies::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::api_hub_dependencies::ListLocations {
        super::builder::api_hub_dependencies::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::api_hub_dependencies::GetLocation {
        super::builder::api_hub_dependencies::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::api_hub_dependencies::ListOperations {
        super::builder::api_hub_dependencies::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::api_hub_dependencies::GetOperation {
        super::builder::api_hub_dependencies::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::api_hub_dependencies::DeleteOperation {
        super::builder::api_hub_dependencies::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::api_hub_dependencies::CancelOperation {
        super::builder::api_hub_dependencies::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::ApiHubCollect;
/// let client = ApiHubCollect::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service exposes methods used for collecting various types of data from
/// different first party and third party sources and push it to Hub's collect
/// layer.
///
/// # Configuration
///
/// To configure `ApiHubCollect` use the `with_*` methods in the type returned
/// by [builder()][ApiHubCollect::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::api_hub_collect::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::api_hub_collect::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `ApiHubCollect` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `ApiHubCollect` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct ApiHubCollect {
    inner: std::sync::Arc<dyn super::stub::dynamic::ApiHubCollect>,
}

impl ApiHubCollect {
    /// Returns a builder for [ApiHubCollect].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::ApiHubCollect;
    /// let client = ApiHubCollect::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::api_hub_collect::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::api_hub_collect::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::ApiHubCollect + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::ApiHubCollect>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubCollect> {
        super::transport::ApiHubCollect::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubCollect> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::ApiHubCollect::new)
    }

    /// Collect API data from a source and push it to Hub's collect layer.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn collect_api_data(&self) -> super::builder::api_hub_collect::CollectApiData {
        super::builder::api_hub_collect::CollectApiData::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::api_hub_collect::ListLocations {
        super::builder::api_hub_collect::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::api_hub_collect::GetLocation {
        super::builder::api_hub_collect::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::api_hub_collect::ListOperations {
        super::builder::api_hub_collect::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::api_hub_collect::GetOperation {
        super::builder::api_hub_collect::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::api_hub_collect::DeleteOperation {
        super::builder::api_hub_collect::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::api_hub_collect::CancelOperation {
        super::builder::api_hub_collect::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::ApiHubCurate;
/// let client = ApiHubCurate::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service is used for managing curations for processing API data consumed
/// from collect layer.
///
/// # Configuration
///
/// To configure `ApiHubCurate` use the `with_*` methods in the type returned
/// by [builder()][ApiHubCurate::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::api_hub_curate::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::api_hub_curate::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `ApiHubCurate` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `ApiHubCurate` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct ApiHubCurate {
    inner: std::sync::Arc<dyn super::stub::dynamic::ApiHubCurate>,
}

impl ApiHubCurate {
    /// Returns a builder for [ApiHubCurate].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::ApiHubCurate;
    /// let client = ApiHubCurate::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::api_hub_curate::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::api_hub_curate::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::ApiHubCurate + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::ApiHubCurate>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubCurate> {
        super::transport::ApiHubCurate::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubCurate> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::ApiHubCurate::new)
    }

    /// Create a curation resource in the API hub.
    /// Once a curation resource is created, plugin instances can start using it.
    pub fn create_curation(&self) -> super::builder::api_hub_curate::CreateCuration {
        super::builder::api_hub_curate::CreateCuration::new(self.inner.clone())
    }

    /// Get curation resource details.
    pub fn get_curation(&self) -> super::builder::api_hub_curate::GetCuration {
        super::builder::api_hub_curate::GetCuration::new(self.inner.clone())
    }

    /// List curation resources in the API hub.
    pub fn list_curations(&self) -> super::builder::api_hub_curate::ListCurations {
        super::builder::api_hub_curate::ListCurations::new(self.inner.clone())
    }

    /// Update a curation resource in the API hub. The following fields in the
    /// [curation][google.cloud.apihub.v1.Curation] can be updated:
    ///
    /// * [display_name][google.cloud.apihub.v1.Curation.display_name]
    /// * [description][google.cloud.apihub.v1.Curation.description]
    ///
    /// The
    /// [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask]
    /// should be used to specify the fields being updated.
    ///
    /// [google.cloud.apihub.v1.Curation]: crate::model::Curation
    /// [google.cloud.apihub.v1.Curation.description]: crate::model::Curation::description
    /// [google.cloud.apihub.v1.Curation.display_name]: crate::model::Curation::display_name
    /// [google.cloud.apihub.v1.UpdateApiRequest.update_mask]: crate::model::UpdateApiRequest::update_mask
    pub fn update_curation(&self) -> super::builder::api_hub_curate::UpdateCuration {
        super::builder::api_hub_curate::UpdateCuration::new(self.inner.clone())
    }

    /// Delete a curation resource in the API hub. A curation can only be deleted
    /// if it's not being used by any plugin instance.
    pub fn delete_curation(&self) -> super::builder::api_hub_curate::DeleteCuration {
        super::builder::api_hub_curate::DeleteCuration::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::api_hub_curate::ListLocations {
        super::builder::api_hub_curate::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::api_hub_curate::GetLocation {
        super::builder::api_hub_curate::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::api_hub_curate::ListOperations {
        super::builder::api_hub_curate::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::api_hub_curate::GetOperation {
        super::builder::api_hub_curate::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::api_hub_curate::DeleteOperation {
        super::builder::api_hub_curate::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::api_hub_curate::CancelOperation {
        super::builder::api_hub_curate::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::ApiHubDiscovery;
/// let client = ApiHubDiscovery::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service exposes methods used to manage DiscoveredApiObservations
/// and DiscoveredApiOperations.
///
/// # Configuration
///
/// To configure `ApiHubDiscovery` use the `with_*` methods in the type returned
/// by [builder()][ApiHubDiscovery::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::api_hub_discovery::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::api_hub_discovery::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `ApiHubDiscovery` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `ApiHubDiscovery` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct ApiHubDiscovery {
    inner: std::sync::Arc<dyn super::stub::dynamic::ApiHubDiscovery>,
}

impl ApiHubDiscovery {
    /// Returns a builder for [ApiHubDiscovery].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::ApiHubDiscovery;
    /// let client = ApiHubDiscovery::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::api_hub_discovery::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::api_hub_discovery::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::ApiHubDiscovery + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::ApiHubDiscovery>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubDiscovery> {
        super::transport::ApiHubDiscovery::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubDiscovery> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::ApiHubDiscovery::new)
    }

    /// Lists all the DiscoveredAPIObservations in a given project and location.
    pub fn list_discovered_api_observations(
        &self,
    ) -> super::builder::api_hub_discovery::ListDiscoveredApiObservations {
        super::builder::api_hub_discovery::ListDiscoveredApiObservations::new(self.inner.clone())
    }

    /// Gets a DiscoveredAPIObservation in a given project, location and
    /// ApiObservation.
    pub fn get_discovered_api_observation(
        &self,
    ) -> super::builder::api_hub_discovery::GetDiscoveredApiObservation {
        super::builder::api_hub_discovery::GetDiscoveredApiObservation::new(self.inner.clone())
    }

    /// Lists all the DiscoveredAPIOperations in a given project, location and
    /// ApiObservation.
    pub fn list_discovered_api_operations(
        &self,
    ) -> super::builder::api_hub_discovery::ListDiscoveredApiOperations {
        super::builder::api_hub_discovery::ListDiscoveredApiOperations::new(self.inner.clone())
    }

    /// Gets a DiscoveredAPIOperation in a given project, location,
    /// ApiObservation and ApiOperation.
    pub fn get_discovered_api_operation(
        &self,
    ) -> super::builder::api_hub_discovery::GetDiscoveredApiOperation {
        super::builder::api_hub_discovery::GetDiscoveredApiOperation::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::api_hub_discovery::ListLocations {
        super::builder::api_hub_discovery::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::api_hub_discovery::GetLocation {
        super::builder::api_hub_discovery::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::api_hub_discovery::ListOperations {
        super::builder::api_hub_discovery::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::api_hub_discovery::GetOperation {
        super::builder::api_hub_discovery::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::api_hub_discovery::DeleteOperation {
        super::builder::api_hub_discovery::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::api_hub_discovery::CancelOperation {
        super::builder::api_hub_discovery::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::HostProjectRegistrationService;
/// let client = HostProjectRegistrationService::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service is used for managing the host project registrations.
///
/// # Configuration
///
/// To configure `HostProjectRegistrationService` use the `with_*` methods in the type returned
/// by [builder()][HostProjectRegistrationService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::host_project_registration_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::host_project_registration_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `HostProjectRegistrationService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `HostProjectRegistrationService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct HostProjectRegistrationService {
    inner: std::sync::Arc<dyn super::stub::dynamic::HostProjectRegistrationService>,
}

impl HostProjectRegistrationService {
    /// Returns a builder for [HostProjectRegistrationService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::HostProjectRegistrationService;
    /// let client = HostProjectRegistrationService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::host_project_registration_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::host_project_registration_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::HostProjectRegistrationService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<
        std::sync::Arc<dyn super::stub::dynamic::HostProjectRegistrationService>,
    > {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::HostProjectRegistrationService> {
        super::transport::HostProjectRegistrationService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::HostProjectRegistrationService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::HostProjectRegistrationService::new)
    }

    /// Create a host project registration.
    /// A Google cloud project can be registered as a host project if it is not
    /// attached as a runtime project to another host project.
    /// A project can be registered as a host project only once. Subsequent
    /// register calls for the same project will fail.
    pub fn create_host_project_registration(
        &self,
    ) -> super::builder::host_project_registration_service::CreateHostProjectRegistration {
        super::builder::host_project_registration_service::CreateHostProjectRegistration::new(
            self.inner.clone(),
        )
    }

    /// Get a host project registration.
    pub fn get_host_project_registration(
        &self,
    ) -> super::builder::host_project_registration_service::GetHostProjectRegistration {
        super::builder::host_project_registration_service::GetHostProjectRegistration::new(
            self.inner.clone(),
        )
    }

    /// Lists host project registrations.
    pub fn list_host_project_registrations(
        &self,
    ) -> super::builder::host_project_registration_service::ListHostProjectRegistrations {
        super::builder::host_project_registration_service::ListHostProjectRegistrations::new(
            self.inner.clone(),
        )
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(
        &self,
    ) -> super::builder::host_project_registration_service::ListLocations {
        super::builder::host_project_registration_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::host_project_registration_service::GetLocation {
        super::builder::host_project_registration_service::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(
        &self,
    ) -> super::builder::host_project_registration_service::ListOperations {
        super::builder::host_project_registration_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::host_project_registration_service::GetOperation {
        super::builder::host_project_registration_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(
        &self,
    ) -> super::builder::host_project_registration_service::DeleteOperation {
        super::builder::host_project_registration_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(
        &self,
    ) -> super::builder::host_project_registration_service::CancelOperation {
        super::builder::host_project_registration_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::LintingService;
/// let client = LintingService::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service provides all methods related to the 1p Linter.
///
/// # Configuration
///
/// To configure `LintingService` use the `with_*` methods in the type returned
/// by [builder()][LintingService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::linting_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::linting_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `LintingService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `LintingService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct LintingService {
    inner: std::sync::Arc<dyn super::stub::dynamic::LintingService>,
}

impl LintingService {
    /// Returns a builder for [LintingService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::LintingService;
    /// let client = LintingService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::linting_service::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::linting_service::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::LintingService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::LintingService>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::LintingService> {
        super::transport::LintingService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::LintingService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::LintingService::new)
    }

    /// Get the style guide being used for linting.
    pub fn get_style_guide(&self) -> super::builder::linting_service::GetStyleGuide {
        super::builder::linting_service::GetStyleGuide::new(self.inner.clone())
    }

    /// Update the styleGuide to be used for liniting in by API hub.
    pub fn update_style_guide(&self) -> super::builder::linting_service::UpdateStyleGuide {
        super::builder::linting_service::UpdateStyleGuide::new(self.inner.clone())
    }

    /// Get the contents of the style guide.
    pub fn get_style_guide_contents(
        &self,
    ) -> super::builder::linting_service::GetStyleGuideContents {
        super::builder::linting_service::GetStyleGuideContents::new(self.inner.clone())
    }

    /// Lints the requested spec and updates the corresponding API Spec with the
    /// lint response. This lint response will be available in all subsequent
    /// Get and List Spec calls to Core service.
    pub fn lint_spec(&self) -> super::builder::linting_service::LintSpec {
        super::builder::linting_service::LintSpec::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::linting_service::ListLocations {
        super::builder::linting_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::linting_service::GetLocation {
        super::builder::linting_service::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::linting_service::ListOperations {
        super::builder::linting_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::linting_service::GetOperation {
        super::builder::linting_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::linting_service::DeleteOperation {
        super::builder::linting_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::linting_service::CancelOperation {
        super::builder::linting_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::ApiHubPlugin;
/// let client = ApiHubPlugin::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service is used for managing plugins inside the API Hub.
///
/// # Configuration
///
/// To configure `ApiHubPlugin` use the `with_*` methods in the type returned
/// by [builder()][ApiHubPlugin::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::api_hub_plugin::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::api_hub_plugin::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `ApiHubPlugin` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `ApiHubPlugin` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct ApiHubPlugin {
    inner: std::sync::Arc<dyn super::stub::dynamic::ApiHubPlugin>,
}

impl ApiHubPlugin {
    /// Returns a builder for [ApiHubPlugin].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::ApiHubPlugin;
    /// let client = ApiHubPlugin::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::api_hub_plugin::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::api_hub_plugin::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::ApiHubPlugin + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::ApiHubPlugin>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubPlugin> {
        super::transport::ApiHubPlugin::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ApiHubPlugin> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::ApiHubPlugin::new)
    }

    /// Get an API Hub plugin.
    pub fn get_plugin(&self) -> super::builder::api_hub_plugin::GetPlugin {
        super::builder::api_hub_plugin::GetPlugin::new(self.inner.clone())
    }

    /// Enables a plugin.
    /// The `state` of the plugin after enabling is `ENABLED`
    pub fn enable_plugin(&self) -> super::builder::api_hub_plugin::EnablePlugin {
        super::builder::api_hub_plugin::EnablePlugin::new(self.inner.clone())
    }

    /// Disables a plugin.
    /// The `state` of the plugin after disabling is `DISABLED`
    pub fn disable_plugin(&self) -> super::builder::api_hub_plugin::DisablePlugin {
        super::builder::api_hub_plugin::DisablePlugin::new(self.inner.clone())
    }

    /// Create an API Hub plugin resource in the API hub.
    /// Once a plugin is created, it can be used to create plugin instances.
    pub fn create_plugin(&self) -> super::builder::api_hub_plugin::CreatePlugin {
        super::builder::api_hub_plugin::CreatePlugin::new(self.inner.clone())
    }

    /// List all the plugins in a given project and location.
    pub fn list_plugins(&self) -> super::builder::api_hub_plugin::ListPlugins {
        super::builder::api_hub_plugin::ListPlugins::new(self.inner.clone())
    }

    /// Delete a Plugin in API hub.
    /// Note, only user owned plugins can be deleted via this method.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_plugin(&self) -> super::builder::api_hub_plugin::DeletePlugin {
        super::builder::api_hub_plugin::DeletePlugin::new(self.inner.clone())
    }

    /// Creates a Plugin instance in the API hub.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_plugin_instance(&self) -> super::builder::api_hub_plugin::CreatePluginInstance {
        super::builder::api_hub_plugin::CreatePluginInstance::new(self.inner.clone())
    }

    /// Executes a plugin instance in the API hub.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn execute_plugin_instance_action(
        &self,
    ) -> super::builder::api_hub_plugin::ExecutePluginInstanceAction {
        super::builder::api_hub_plugin::ExecutePluginInstanceAction::new(self.inner.clone())
    }

    /// Get an API Hub plugin instance.
    pub fn get_plugin_instance(&self) -> super::builder::api_hub_plugin::GetPluginInstance {
        super::builder::api_hub_plugin::GetPluginInstance::new(self.inner.clone())
    }

    /// List all the plugins in a given project and location.
    /// `-` can be used as wildcard value for {plugin_id}
    pub fn list_plugin_instances(&self) -> super::builder::api_hub_plugin::ListPluginInstances {
        super::builder::api_hub_plugin::ListPluginInstances::new(self.inner.clone())
    }

    /// Enables a plugin instance in the API hub.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn enable_plugin_instance_action(
        &self,
    ) -> super::builder::api_hub_plugin::EnablePluginInstanceAction {
        super::builder::api_hub_plugin::EnablePluginInstanceAction::new(self.inner.clone())
    }

    /// Disables a plugin instance in the API hub.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn disable_plugin_instance_action(
        &self,
    ) -> super::builder::api_hub_plugin::DisablePluginInstanceAction {
        super::builder::api_hub_plugin::DisablePluginInstanceAction::new(self.inner.clone())
    }

    /// Updates a plugin instance in the API hub.
    /// The following fields in the
    /// [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated
    /// currently:
    ///
    /// * [display_name][google.cloud.apihub.v1.PluginInstance.display_name]
    /// * [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression]
    ///
    /// The
    /// [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask]
    /// should be used to specify the fields being updated.
    ///
    /// To update the
    /// [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and
    /// [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config]
    /// of the plugin instance, use the
    /// [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig]
    /// method.
    ///
    /// [google.cloud.apihub.v1.PluginInstance]: crate::model::PluginInstance
    /// [google.cloud.apihub.v1.PluginInstance.additional_config]: crate::model::PluginInstance::additional_config
    /// [google.cloud.apihub.v1.PluginInstance.auth_config]: crate::model::PluginInstance::auth_config
    /// [google.cloud.apihub.v1.PluginInstance.display_name]: crate::model::PluginInstance::display_name
    /// [google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask]: crate::model::UpdatePluginInstanceRequest::update_mask
    pub fn update_plugin_instance(&self) -> super::builder::api_hub_plugin::UpdatePluginInstance {
        super::builder::api_hub_plugin::UpdatePluginInstance::new(self.inner.clone())
    }

    /// Deletes a plugin instance in the API hub.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_plugin_instance(&self) -> super::builder::api_hub_plugin::DeletePluginInstance {
        super::builder::api_hub_plugin::DeletePluginInstance::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::api_hub_plugin::ListLocations {
        super::builder::api_hub_plugin::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::api_hub_plugin::GetLocation {
        super::builder::api_hub_plugin::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::api_hub_plugin::ListOperations {
        super::builder::api_hub_plugin::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::api_hub_plugin::GetOperation {
        super::builder::api_hub_plugin::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::api_hub_plugin::DeleteOperation {
        super::builder::api_hub_plugin::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::api_hub_plugin::CancelOperation {
        super::builder::api_hub_plugin::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::Provisioning;
/// let client = Provisioning::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service is used for managing the data plane provisioning of the API hub.
///
/// # Configuration
///
/// To configure `Provisioning` use the `with_*` methods in the type returned
/// by [builder()][Provisioning::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::provisioning::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::provisioning::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `Provisioning` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `Provisioning` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct Provisioning {
    inner: std::sync::Arc<dyn super::stub::dynamic::Provisioning>,
}

impl Provisioning {
    /// Returns a builder for [Provisioning].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::Provisioning;
    /// let client = Provisioning::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::provisioning::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::provisioning::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::Provisioning + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::Provisioning>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Provisioning> {
        super::transport::Provisioning::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::Provisioning> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::Provisioning::new)
    }

    /// Provisions instance resources for the API Hub.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_api_hub_instance(&self) -> super::builder::provisioning::CreateApiHubInstance {
        super::builder::provisioning::CreateApiHubInstance::new(self.inner.clone())
    }

    /// Deletes the API hub instance.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_api_hub_instance(&self) -> super::builder::provisioning::DeleteApiHubInstance {
        super::builder::provisioning::DeleteApiHubInstance::new(self.inner.clone())
    }

    /// Gets details of a single API Hub instance.
    pub fn get_api_hub_instance(&self) -> super::builder::provisioning::GetApiHubInstance {
        super::builder::provisioning::GetApiHubInstance::new(self.inner.clone())
    }

    /// Looks up an Api Hub instance in a given GCP project. There will always be
    /// only one Api Hub instance for a GCP project across all locations.
    pub fn lookup_api_hub_instance(&self) -> super::builder::provisioning::LookupApiHubInstance {
        super::builder::provisioning::LookupApiHubInstance::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::provisioning::ListLocations {
        super::builder::provisioning::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::provisioning::GetLocation {
        super::builder::provisioning::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::provisioning::ListOperations {
        super::builder::provisioning::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::provisioning::GetOperation {
        super::builder::provisioning::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::provisioning::DeleteOperation {
        super::builder::provisioning::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::provisioning::CancelOperation {
        super::builder::provisioning::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the API hub API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_apihub_v1::client::RuntimeProjectAttachmentService;
/// let client = RuntimeProjectAttachmentService::builder().build().await?;
/// // use `client` to make requests to the API hub API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// This service is used for managing the runtime project attachments.
///
/// # Configuration
///
/// To configure `RuntimeProjectAttachmentService` use the `with_*` methods in the type returned
/// by [builder()][RuntimeProjectAttachmentService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://apihub.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::runtime_project_attachment_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::runtime_project_attachment_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `RuntimeProjectAttachmentService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `RuntimeProjectAttachmentService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct RuntimeProjectAttachmentService {
    inner: std::sync::Arc<dyn super::stub::dynamic::RuntimeProjectAttachmentService>,
}

impl RuntimeProjectAttachmentService {
    /// Returns a builder for [RuntimeProjectAttachmentService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_apihub_v1::client::RuntimeProjectAttachmentService;
    /// let client = RuntimeProjectAttachmentService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::runtime_project_attachment_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::runtime_project_attachment_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::RuntimeProjectAttachmentService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<
        std::sync::Arc<dyn super::stub::dynamic::RuntimeProjectAttachmentService>,
    > {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::RuntimeProjectAttachmentService> {
        super::transport::RuntimeProjectAttachmentService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::RuntimeProjectAttachmentService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::RuntimeProjectAttachmentService::new)
    }

    /// Attaches a runtime project to the host project.
    pub fn create_runtime_project_attachment(
        &self,
    ) -> super::builder::runtime_project_attachment_service::CreateRuntimeProjectAttachment {
        super::builder::runtime_project_attachment_service::CreateRuntimeProjectAttachment::new(
            self.inner.clone(),
        )
    }

    /// Gets a runtime project attachment.
    pub fn get_runtime_project_attachment(
        &self,
    ) -> super::builder::runtime_project_attachment_service::GetRuntimeProjectAttachment {
        super::builder::runtime_project_attachment_service::GetRuntimeProjectAttachment::new(
            self.inner.clone(),
        )
    }

    /// List runtime projects attached to the host project.
    pub fn list_runtime_project_attachments(
        &self,
    ) -> super::builder::runtime_project_attachment_service::ListRuntimeProjectAttachments {
        super::builder::runtime_project_attachment_service::ListRuntimeProjectAttachments::new(
            self.inner.clone(),
        )
    }

    /// Delete a runtime project attachment in the API Hub. This call will detach
    /// the runtime project from the host project.
    pub fn delete_runtime_project_attachment(
        &self,
    ) -> super::builder::runtime_project_attachment_service::DeleteRuntimeProjectAttachment {
        super::builder::runtime_project_attachment_service::DeleteRuntimeProjectAttachment::new(
            self.inner.clone(),
        )
    }

    /// Look up a runtime project attachment. This API can be called in the context
    /// of any project.
    pub fn lookup_runtime_project_attachment(
        &self,
    ) -> super::builder::runtime_project_attachment_service::LookupRuntimeProjectAttachment {
        super::builder::runtime_project_attachment_service::LookupRuntimeProjectAttachment::new(
            self.inner.clone(),
        )
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(
        &self,
    ) -> super::builder::runtime_project_attachment_service::ListLocations {
        super::builder::runtime_project_attachment_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::runtime_project_attachment_service::GetLocation {
        super::builder::runtime_project_attachment_service::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(
        &self,
    ) -> super::builder::runtime_project_attachment_service::ListOperations {
        super::builder::runtime_project_attachment_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(
        &self,
    ) -> super::builder::runtime_project_attachment_service::GetOperation {
        super::builder::runtime_project_attachment_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(
        &self,
    ) -> super::builder::runtime_project_attachment_service::DeleteOperation {
        super::builder::runtime_project_attachment_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(
        &self,
    ) -> super::builder::runtime_project_attachment_service::CancelOperation {
        super::builder::runtime_project_attachment_service::CancelOperation::new(self.inner.clone())
    }
}
